home *** CD-ROM | disk | FTP | other *** search
/ AmigActive 22 / AACD 22.iso / AACD / Programming / powerd / lib / chunky.lha / chunky / GetPixel.ass < prev    next >
Encoding:
Text File  |  1980-01-24  |  339 b   |  28 lines

  1.  
  2. ; GetPixelchunky:a0:PTR TO chunky,x:d0:LONG,y:d1:LONG)(LONG)
  3.  
  4.     machine    mc68020
  5.     fpu    1
  6.  
  7.     xdef    _GetPixel
  8.  
  9. _GetPixel
  10.     cmpa.l    #0,a0
  11.     beq.s    .out
  12.     tst.l    d0
  13.     blt.s    .out
  14.     tst.l    d1
  15.     blt.s    .out
  16.     cmp.l    (a0),d0
  17.     bge.s    .out
  18.     cmp.l    (4,a0),d1
  19.     bge.s    .out
  20.  
  21.     muls.l    (a0),d1
  22.     add.l    d0,d1
  23.     movea.l    (8,a0),a1
  24.     move.b    (a1,d1.l),d0
  25.     rts
  26. .out    moveq    #-1,d0
  27.     rts
  28.